apt-get update
apt-get install -y apt-transport-https  ca-certificates gnupg-agent   software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
apt-key fingerprint 0EBFCD88
apt-get install docker-ce docker-ce-cli containerd.io

# 验证是否安装成功
#systemctl start docker
docker run hello-world


# 安装docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
echo -e  "\n\n\nTesting if docker-compose is successfully installed\n"
docker-compose --version

